<script>var base_url=function(b){var c="<?php echo base_url() ?>";if(b){return c+b;}else{return c;};};</script>
<script src="<?php echo base_url('assets/js/plugins.js') ?>"></script>
<script src="<?php echo base_url('assets/js/app.js') ?>"></script>

<?php if (!empty($js)) {
  foreach ($js as $file) { ?>
    <script src="<?php echo base_url("assets/js/$file.js") ?>"></script>
  <?php }
} ?>